<template>
	<view class="page-wraper">
		<customNav ref="customNavRef" class="header-class" bgColor="#ffffff00" backIconColor="black"></customNav>
		<view class="bkg" >
			<view style="flex-direction: column; display: flex;justify-content: center; align-items: center;background-color: white; width:100%; height:200px;">
				<image class="logo" src="/static/setting_icon.jpg" mode="" style="margin-top: -20px;"></image>
				<text class="version">版本：v6.4.2</text>
			</view>
			<!-- :style="{height:height}" -->
			<view style="margin-top: 8px; width:100%; padding-bottom:50px;  background-color: white; " class="" >
			<!-- 	<view class="cell" @click="changePwd()">
					<text class="cell" style="flex: 1;">修改密码</text>
					<image class="cell_right_icon"  src="/static/right_back.png" mode=""></image>
				</view> -->
				<view class="cell" @click="nextPage('contact_us')">
					<text  class="cell" style="flex: 1;">联系我们</text>
					<image class="cell_right_icon"  src="/static/right_back.png" mode=""></image>
				</view>
<!-- 				<view class="cell">
					<text class="cell" style="flex: 1;">检查新版本</text>
					<image class="cell_right_icon"  src="/static/right_back.png" mode=""></image>
				</view> -->
<!-- 				<view class="cell">
					<text class="cell" style="flex: 1;">意见反馈</text>
					<image class="cell_right_icon"  src="/static/right_back.png" mode=""></image>
				</view> -->
				<view class="cell" @click="nextPage('user_agreement')">
					<text class="cell" style="flex: 1;">用户协议</text>
					<image class="cell_right_icon"  src="/static/right_back.png" mode=""></image>
				</view>
				<view class="cell" @click="nextPage('privacy_policy')">
					<text class="cell" style="flex: 1;">隐私政策</text>
					<image class="cell_right_icon"  src="/static/right_back.png" mode=""></image>
				</view>
				<view class="cell" @click="nextPage('about_we')">
					<text class="cell" style="flex: 1;">关于我们</text>
					<image class="cell_right_icon"  src="/static/right_back.png" mode=""></image>
				</view>
				
				<button @click="logout()" class="btn">退出登录</button>
			</view>
			
			
		</view>
		
	</view>
</template>

<script>
	import customNav from "@/components/custom-nav/custom-nav.vue";
	import cssArcBackground from "@/components/cssArcBackground/cssArcBackground.vue";
	import addressSearch from "@/components/addressSearch/addressSearch.vue";
	

	export default {
		components: {
			customNav,
			addressSearch,
			cssArcBackground
		},
		data() {
			height:0
		},
		onLoad() {
			
		},
		mounted() {
			console.log('1111',this.$refs.customNavRef.height);
			const h=this.$refs.customNavRef.height;
			this.height=`calc(100vh -  ${h}px)`;
		},
		methods: {
			nextPage(name) {
				uni.navigateTo({
					url: '/pages/user/settings/webpage?name=' + name
				})
			},
			
			changePwd() {
				uni.navigateTo({
					url: '/pages/login/forget'
				})
			}, 
			logout() {
				uni.removeStorage({
					key: 'login',
					success:function(res){
						uni.reLaunch({
							url: '/main/home/index/index'
						})
					}
				})
				
			}
		}
	}
</script>

<style>
	
	.btn {
		background: #0E59EA;
		border-radius: 7px;
		height: 45px;
		background: #0E59EA;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 16px;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		opacity: 1;
		margin: 40px 24px 20px 24px;
	}
	
	.cell {
		display: flex;
		flex-direction: row;
		height: 60px;
		align-items: center;
		margin-left: 14px;
	}
	
	.cell_title {
		font-size: 14px;
		font-family: PingFang SC;
		font-weight: 500;
		color: #333333;
	}
	
	.cell_right_icon {
		width: 7px;
		height: 14px;
		margin-right: 14px;
	}
	
	.version {
		margin-top: 14px;
		font-size: 14px;
		font-family: PingFang SC;
		font-weight: 500;
		color: #333333;
		opacity: 1;
	}
	
	.logo {
		margin-top: 50px;
		width: 90px;
		height: 90px;
	}
	
	.bkg {
		width: 100%;
		height: auto;
		background-color: #F2F2F2;
	}
	
</style>